package implementation;

import protocol.Query;
import protocol.State;
import protocol.StateObject;

public class ClosingHandler {

	public static boolean handleClosing(StateObject nextState, Query query) {
		ExecUtils.playPrompt("ThankYouMessage", nextState);
		
		ExecUtils.getUserInput(query, "gram_closing");
		boolean sessionTerminated = true;
		if(query.getShortConf() != null && query.getShortConf().equals("StartOver"))
		{
			nextState.setState(State.NUMTIX);
			sessionTerminated = false;
		}
		else
			ExecUtils.playPrompt("Goodbye", nextState);
		
		return sessionTerminated;
	}

}
